public class Disk extends Component implements hasVolume
{
    private final String volume;
    Disk(String Name, String brand, int price, String volume)
    {
        super(Name, brand, price);
        this.volume = volume;
    }

    @Override
    public String work()
    {
        return "Disk work";
    }

    @Override
    public String getVolume()
    {
        return this.volume;
    }

    @Override
    public String getInfo()
    {
        return "名称：" + this.getName() + " 品牌：" + this.getBrand()
                + " 容量：" + this.getVolume() + " 价格：" + this.getPrice();
    }
}
